package com.liang.blog.reception.controller;

import com.liang.blog.common.result.Result;
import com.liang.blog.model.BlogMsgInfo;
import com.liang.blog.reception.service.BlogMsgInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：YanWenLiang
 * @Date:2024-05-02-20:27
 */
@RestController
@RequestMapping("/msg")
public class BlogMsgInfoController {

    @Autowired
    private BlogMsgInfoService blogMsgInfoService;

    @GetMapping("/list/{sessionListId}")
    public Result getMsgInfoList(@PathVariable String sessionListId){
        List<BlogMsgInfo> msgInfos = blogMsgInfoService.getMsgInfoList(sessionListId);
        return Result.ok(msgInfos);
    }
}
